﻿
@{
    Layout = null;
}

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>动态生成Word</title>
    <!--pageoffice.js一定要引用--->
    <script type="text/javascript" src="~/pageoffice.js"></script>
    <script type="text/javascript">
        function myFunc(type) {
            alert("文件生成成功！");
            document.getElementById("pgImg").style.display = "none";
            if ("1" == type) {
                //下载生成的pdf文件
                location.href = "DownWord";
            } else if ("2" == type) {
                //打开pdf文件
                POBrowser.openWindowModeless('Word', 'width=1200px;height=800px;');
            }
        }
        function convert(type) {
            document.getElementById("pgImg").style.display = "block";
            POBrowser.openWindowModeless('FileMakerSingle?type=' + type, 'width=1px;height=1px;frame=no;');
        }
    </script>
</head>
<body style="text-align: center;">
    <a href="javascript:;" onclick="convert(1)">1.动态生成Word文件并下载文件</a><br><br>
    <a href="javascript:;" onclick="convert(2)">2.动态生成Word文件并打开文件</a>
    <div id="pgImg" style="with:100px;height:100px;margin-top:20px;display: none;">
        正在生成文件，请稍等：<img src="../FileMakerSingle/image/pg.gif">
    </div>
</body>
</html>
